{extend name='main'}

{block name="button"}
{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='face/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='text-center'>序号</th>
            <th class='text-center'>进店头像</th>
            <th class='text-center'>FaceId</th>
            <th class='text-center'>进/出</th>
            <th class='text-center'>获取时间</th>
            <th class='text-center'>年龄</th>
            <th class='text-center'>性别</th>
            <th class='text-center'>摄像机</th>
            <th class='text-center'>店铺</th>
            <th class='text-center'>备注</th>
            <th class='text-center'>操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {volist name="list" id="vo"}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='' type='checkbox'></label>
            </td>
            <td class='text-center'>{$vo.id}</td>
            <td class='text-center'><img data-tips-image="" src="{$vo.photo}" width="60px" height="60px"></td>
            <td class='text-center'>{$vo.face_id|default='-'}</td>
            <td class='text-center'>
                {if $vo.is_come eq 1}
                <span style="color: #00B83F">进</span>
                {elseif $vo.is_come eq 2}
                <span style="color: red">出</span>
                {else}
                <span style="color: #6c6c6c">未关联</span>
                {/if}
            </td>
            <td class='text-center'>{if $vo.enter_time>0}{:date('Y-m-d H:i:s',$vo.enter_time)}{else}-{/if}</td>
            <td class='text-center'>{$vo.age|default='-'}</td>
            <td class='text-center'>{$vo.sex}</td>
            <td class='text-center'>{$vo.equipment_id|default='-'}</td>
            <td class='text-center'>{$vo.name|default='-'}</td>
            <td class='text-center' data-tips-text="{$vo.remark|default=''}">{$vo.remark|omit|default='暂无'}</td>
            <td class='text-left nowrap'>

                    <a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑" data-modal='{:url("admin/face/edit")}?id={$vo.id}'>编辑备注</a>
                    {if $vo.status==0}
                    <a class="layui-btn layui-btn-xs layui-btn-warm" data-confirm="确定设置为白名单?" data-action="{:url('admin/face/state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('admin/face/state')}">设为白名单</a>
                    {elseif $vo.status==1}
                    <a class="layui-btn layui-btn-xs layui-btn-warm" data-confirm="确定移除白名单?" data-action="{:url('admin/face/state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('admin/face/state')}">移出白名单</a>
                    {/if}

                </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}